package com.bawei.detail.api

import com.bawei.common.api.BaseApiServer
import com.bawei.common.entity.CommendEntity
import com.bawei.common.entity.MovieVideoEntity
import com.bawei.detail.entity.AuthorEntity
import com.bawei.detail.entity.DanmuEntity
import com.bawei.network.BaseResponse
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

/**
 * Author: Jason Zhang
 * Date: 2025/2/11
 * Desc:
 */
interface DetailServerApi: BaseApiServer {

    @GET("/videoauthor/getAuthorById")
    suspend fun getAuthorById(@Query("userId") userId: String): BaseResponse<AuthorEntity>

    //获取推荐的视频
    @GET("/videomulti/getRecommendMutilVideo")
    suspend fun getRecommendMultiVideo(@Query("page") page: Int, @Query("pagesize") pageSize: Int): BaseResponse<List<MovieVideoEntity>>

    //获取二级分类视频
    @GET("/videomulti/getMutilVideoByTypeId")
    suspend fun getMultiVideoByTypeId(@Query("typeid") typeId: Int, @Query("page") page: Int, @Query("pagesize") pageSize: Int): BaseResponse<List<MovieVideoEntity>>

    @GET("/comment/getCommentByUserId")
    suspend fun getCommentByUserId(@Query("datatype") dataType: Int, @Query("itemid") itemId: String): BaseResponse<List<CommendEntity>>

    //20250215 游戏鸿蒙-i视频-10-性能升级-多版本兼容 发送弹幕
    @POST("/bulletscreen/publishBulletScreen")
    suspend fun publishDanmuMsg(@Body entity: DanmuEntity): BaseResponse<DanmuEntity>

    //20250215 游戏鸿蒙-i视频-10-性能升级-多版本兼容 获取历史弹幕
    @GET("/bulletscreen/getBulletScreenInfo")
    suspend fun getBulletScreenInfo(@Query("datatype") dataType: Int, @Query("itemid") itemId: String): BaseResponse<List<DanmuEntity>>


}